import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsNumber, IsBoolean } from 'class-validator';

export class SaveMenuDto {
  @ApiProperty({ description: '菜单类型' })
  @IsNotEmpty()
  @IsString()
  menuType: string;

  @ApiProperty({ description: '菜单名称' })
  @IsNotEmpty()
  @IsString()
  name: string;

  @ApiProperty({ description: '菜单路径' })
  @IsNotEmpty()
  @IsString()
  path: string;

  @ApiProperty({ description: '菜单图标' })
  @IsNotEmpty()
  @IsString()
  icon: string;

  @ApiProperty({ description: '菜单排序' })
  @IsNotEmpty()
  @IsNumber()
  sortOrder: number;

  @ApiProperty({ description: '父菜单ID' })
  @IsNotEmpty()
  @IsNumber()
  parentId: number;

  @ApiProperty({ description: '是否隐藏' })
  @IsNotEmpty()
  @IsBoolean()
  isHide: boolean;
}
